feat: add notifications command to CLI#8
Conversation
Adds `recoup notifications` command that wraps POST /api/notifications to send email notifications to the authenticated account's email address. Supports --subject, --text, --html, --cc (repeatable), --room-id, and --json flags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughA new notifications CLI command is introduced, enabling users to send notification emails with configurable subject, body (text or HTML), CC recipients, and optional chat room linking. A GitHub Actions workflow is added to automate testing on pull requests to main. Changes
Sequence DiagramsequenceDiagram
actor User as User
participant CLI as CLI
participant Client as HTTP Client
participant API as API Server
User->>CLI: pnpm notifications --subject "..." [options]
activate CLI
CLI->>CLI: Parse arguments & options
CLI->>CLI: Build request body
CLI->>Client: POST /api/notifications
activate Client
Client->>API: HTTP POST request
activate API
API-->>Client: Response (success/error)
deactivate API
deactivate Client
alt Success
CLI->>CLI: Format output (JSON or message)
CLI-->>User: Display result
else Error
CLI->>CLI: Log error message
CLI->>User: Exit with code 1
end
deactivate CLI
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Runs unit tests and build on all PRs targeting main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
recoup notificationscommand that wrapsPOST /api/notifications--subject,--text,--html,--cc(repeatable),--room-id, and--jsonflagsTest plan
recoup notifications --subject "Test" --text "Hello"🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests
Chores